Multiplex processing of DNA samples using oligonucleotide “barcode” tags can make sample processing more efficient. In this approach, a number of distinct oligonucleotides are selected, and for each DNA sample a unique olignucleotide is incorporated (e.g. by including it in a vector during cloning or as part of a PCR primer during amplification). The number of samples that can be processed in parallel is determined by how reliably the barcode tags can be identified from the resulting DNA sequences. There are 4N oligonucleotides of length N, but because of sequencing errors it is not possible to reliably distinguish 4N oligonucleotide sequences with 100% probability. Thus, better methods for optimizing the design of the barcode sequences for particular sequencing technologies, which take into account particular estimated sets of errors are needed. The present invention satisfies these and other needs.